
import React from 'react';
// import Demo from './Demo';
// import Detail from './Detail';
// import {NewDetail} from './Hoc';
// import Detail from './Detail';
import { BrowserRouter as Router } from 'react-router-dom';
import Header from './Header'
import Content from './Content'
import { AuthProvider } from './Context';
// <Demo/>

// props.children示例
const Box = (props) => {
  return <div>
    <div>
      <h2>标题</h2>
      <h1>22</h1>
    </div>
    {props.children}
  </div>
}

const App = () => {

  return (
    <AuthProvider>
      {/* <Box><h1>123</h1></Box> */}
      {/* 传参props就显示，不传就不显示 */}
      {/* Box与这段代码效果相同：
      <div>
        <h2>标题</h2>
        <h3>hello</h3>
      </div> */}

      <Router>
        <div>
          <Header />
          <Content />
        </div>
      </Router>
    </AuthProvider>
  )
}

export default App;
